import {getBannerList } from '../../../request/api'

const state = {
    bannerList:[]
}
const getters = {
    getBannerList(state){
        
        return state.bannerList
    }
}
const mutations = {
    REQ_BANNERLIST(state,payload){
        state.bannerList = payload
    }
}
const actions = {
    //获取菜单列表的行动
    getBannerListAction({commit}){
        getBannerList()
        .then(res=>{
            console.log(res,'sdhakfasjkf');
            if(res.code==200){
                commit('REQ_BANNERLIST',res.list)
            }
        })
    }
}

export default {
    state,
    getters,
    mutations,
    actions,
    namespaced:true
}